<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>出错啦</title>
    <style>
        html,
        body {
            width: 100%;
            height: 100%;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            position: relative;
            display: flex;
            flex-flow: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .info {
            position: absolute;
            top: 50px;
            left: 0;
            right: 0;
            margin: auto;
            font-size: 18px;
            text-align: center;
            color: #ffb0fa;
        }

        .bg-image {
            width: 360px;
            height: 360px;
        }

        .returning {
            position: absolute;
            bottom: 50px;
            left: 0;
            right: 0;
            margin: auto;
            font-size: 18px;
            text-align: center;
            color: #ffb0fa;
        }
    </style>
    <script>
        window.onload = function () {
            var restimeNode = document.getElementById('restime');
            var second = 1;
            var handler = setInterval(() => {
                second++;
                restimeNode.innerHTML = second;
                if (second === 5) {
                    clearInterval(handler);
                    window.location.href = '/';
                }
            }, 1000);
        }
    </script>
</head>
<body>
<p class="info" th:text="${message}"></p>
<img class="bg-image" src="/images/404.jpg">
<p class="returning">
    <span id="restime">1</span>
    <span> 秒后自动返回首页，或者</span>
    <a href="/">立即返回</a>
</p>
</body>
</html>